package com.example.chat.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.chat.pojo.bo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 林邵晨
 * @since 2023-04-07
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from tb_user where username = #{username}")
    User selectByUsername(String username);

    @Select("select id,username,sex,avatar,phone,cid,date from tb_user where cid = #{cid}")
    User selectByCid(String cid);
}
